<template>
  <div>
    <TreeVue :data="data" />
  </div>
</template>
<script setup lang="ts">
import { ref, reactive } from "vue";
import TreeVue from './Tree.vue';
interface Tree {
  name: string,
  checked: boolean,
  children?: Tree[]
}
const data = reactive<Tree[]>([
  {
    name: '1',
    checked: false,
    children: [
      {
        name: '1-1',
        checked: false
      }
    ]
  },
  {
    name: '2',
    checked: false
  },
  {
    name: '3',
    checked: false,
    children: [
      {
        name: '3-1',
        checked: false,
        children: [
          {
            name: '3-1-1',
            checked: false
          }
        ]
      }
    ]
  },
])
</script>
<style lang="scss">
#app {
  @include bfc;
}
</style>